// 仅用来放全局scss变量
$maxWidth: 480px;
$valid-sides: top, bottom, left, right;
$page-max-with: 480px;

@mixin border-half-pel($color, $sides: $valid-sides) {
  $top-gradient: none;
  $bottom-gradient: none;
  $left-gradient: none;
  $right-gradient: none;
  @each $side in $sides {
    @if $side == top {
      $top-gradient: linear-gradient(180deg, $color, $color 51%, transparent 51%) top left / 100% 1px no-repeat;
    } @else if $side == bottom {
      $bottom-gradient: linear-gradient(0, $color, $color 51%, transparent 51%) bottom right / 100% 1px no-repeat;
    } @else if $side == left {
      $left-gradient: linear-gradient(-90deg, $color, $color 51%, transparent 51%) bottom left / 1px 100% no-repeat;
    } @else if $side == right {
      $right-gradient: linear-gradient(90deg, $color, $color 51%, transparent 51%) top right / 1px 100% no-repeat;
    }
  }

  background: $top-gradient, $right-gradient, $bottom-gradient, $left-gradient;
}

@mixin safeAreaBottom {
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
}

@mixin fixPosition {
    position: fixed;
    margin: auto;
    left: 0;
    right: 0;
    max-width: $maxWidth;
}

@mixin absolutePosition {
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    max-width: $maxWidth;
}

// 拼团活动气氛变量
// 拼团-渐变颜色
$pintuan-linear-gradient: linear-gradient(90deg, #FF4953 0%, #FF654D 50%, #FF8147 100%);
// 拼团-颜色
$pintuan-color: #FF4C51;
// 拼团-sku选中背景颜色
$pintuan-sku-bacground: #FCDBDD;

// 限时折扣活动气氛变量
// 限时折扣-渐变颜色
$zhekou-linear-gradient: linear-gradient(90deg, #FF4953 0%, #FF654D 50%, #FF8147 100%);
// 限时折扣-颜色
$zhekou-color: #FF4C51;
// 限时折扣-sku选中背景颜色
$zhekou-sku-bacground: #FCDBDD;

// 导出为js
:export {
    // 拼团-渐变颜色
    pintuanLinearGradient: $pintuan-linear-gradient;
    // 拼团-颜色
    pintuanColor:$pintuan-color;
    // 拼团-sku选中背景颜色
    pintuanSkuBacground: $pintuan-sku-bacground;

    // 限时折扣-渐变颜色
    zhekouLinearGradient: $zhekou-linear-gradient;
    // 限时折扣-颜色
    zhekouColor:$zhekou-color;
    // 限时折扣-sku选中背景颜色
    zhekouSkuBacground: $zhekou-sku-bacground;
}

